#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QPainter>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    m_pThermometer = new CThermometer();  //注意这里不用传this, 不然就以MainWindow的坐标基准来放置温度计

    connect(m_pThermometer, &CThermometer::sig_SendValue, [this](float value)
    {
        ui->label_value->setText(QString::number(value * 130));
    });
}

MainWindow::~MainWindow()
{
    delete ui;
}


